package com.ls.controller.invite;

import com.ls.controller.invite.model.AddInviteModel;
import com.ls.entity.Invite;
import com.ls.service.IInviteService;
import com.ls.utils.ResultData;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * @ClassName InviteController
 * @Description 邀请函
 *
 * @author pengyu
 * @since 2024-06-28
 */
@Api(value = "邀请函", tags = "邀请函")
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("/invite")
public class InviteController {
    private final IInviteService service;
    /** 新增邀请函  */
    @PostMapping("add")
    public ResultData add(@Valid @RequestBody AddInviteModel model) {
        return service.add(model);
    }

    /** 查询邀请函详情 */
    @GetMapping("getDetail")
    public ResultData getDetail(@RequestParam Long customerId) {
        return service.getDetail(customerId);
    }
}
